import time

from selenium import webdriver
from selenium.webdriver.common.by import By

from unittest import TestCase


class TestLogin(TestCase):

    # 登陆成功用例
    def testLogin1(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi"
        password = "123456"
        expect = "个人理财系统"
        pay = "666666"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[1]/a").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[6]/button").click()

        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)

        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()

        time.sleep(2)

        driver.quit()

    def testLogin2(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi"
        password = "123456"
        expect = "个人理财系统"
        pay = "666667"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[1]/a").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[6]/button").click()

        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)

        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()

        time.sleep(2)

        driver.quit()

    def testLogin3(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi4"
        password = "123456"
        expect = "个人理财系统"
        pay = "666666"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[1]/a").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[6]/button").click()

        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)

        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()

        time.sleep(2)

        driver.quit()

    def testLogin4(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi5"
        password = "123456"
        expect = "个人理财系统"
        pay = "666666"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[1]/a").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[6]/button").click()

        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)

        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()

        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()

        time.sleep(2)

        driver.quit()

    def testLogin5(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi"
        password = "123456"
        expect = "个人理财系统"
        pay = "666666"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
#个人理财
        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[2]/a").click()
#期限理财
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[8]/button").click()
#支付宝投资
        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)
#输密码
        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()
#确定
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
#确定
        time.sleep(2)

        driver.quit()

    def testLogin6(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi"
        password = "123456"
        expect = "个人理财系统"
        pay = "666667"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
#个人理财
        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[2]/a").click()
#期限理财
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[8]/button").click()
#支付宝投资
        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)
#输密码
        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()
#确定
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
#确定
        time.sleep(2)

        driver.quit()

    def testLogin7(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi4"
        password = "123456"
        expect = "个人理财系统"
        pay = "666666"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
#个人理财
        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[2]/a").click()
#期限理财
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[8]/button").click()
#支付宝投资
        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)
#输密码
        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()
#确定
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
#确定
        time.sleep(2)

        driver.quit()

    def testLogin8(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi5"
        password = "123456"
        expect = "个人理财系统"
        pay = "666666"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
#个人理财
        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[2]/a").click()
#期限理财
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[8]/button").click()
#支付宝投资
        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)
#输密码
        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()
#确定
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
#确定
        time.sleep(2)

        driver.quit()

    def testLogin9(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi"
        password = "123456"
        expect = "个人理财系统"
        pay = "666666"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
#个人理财
        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
#基金理财
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
#广发投资
        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)
#输密码
        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()
#确定
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
#确定
        time.sleep(2)

        driver.quit()

    def testLogin10(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi"
        password = "123456"
        expect = "个人理财系统"
        pay = "666667"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
#个人理财
        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
#基金理财
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
#广发投资
        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)
#输密码
        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()
#确定
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
#确定
        time.sleep(2)

        driver.quit()

    def testLogin11(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi4"
        password = "123456"
        expect = "个人理财系统"
        pay = "666666"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
#个人理财
        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
#基金理财
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
#广发投资
        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)
#输密码
        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()
#确定
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
#确定
        time.sleep(2)

        driver.quit()

    def testLogin12(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi5"
        password = "123456"
        expect = "个人理财系统"
        pay = "666666"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
#个人理财
        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
#基金理财
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
#广发投资
        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)
#输密码
        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()
#确定
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
#确定
        time.sleep(2)

        driver.quit()

    def testLogin13(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi6"
        password = "123456"
        expect = "个人理财系统"
        pay = "666666"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
#个人理财
        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
#基金理财
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
#广发投资
        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)
#输密码
        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()
#确定
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
#确定
        time.sleep(2)

        driver.quit()

    def testLogin14(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi7"
        password = "123456"
        expect = "个人理财系统"
        pay = "123456"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
#个人理财
        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
#基金理财
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
#广发投资
        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)
#输密码
        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()
#确定
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
#确定
        time.sleep(2)

        driver.quit()

    def testLogin15(self):
        driver = webdriver.Chrome()

        driver.get("http://localhost:90/")

        driver.maximize_window()

        # 定位
        '''
            8大定位：
                xpath:绝对路径，相对定位
                id,css,class_name,tag....
        '''
        username = "lisi7"
        password = "123456"
        expect = "个人理财系统"
        pay = "123456"

        # driver.find_element(By.ID,"username").send_keys("lisi")

        driver.find_element(By.XPATH, "//input[@id='username' and @name='username']").send_keys(username)

        time.sleep(2)
        # 输入密码
        # driver.find_element(By.ID,"password").send_keys("123456")
        driver.find_element(By.XPATH, "/html/body/div/div/div/form/div[2]/input").send_keys(password)

        time.sleep(2)
        # 点击登陆
        # driver.find_element(By.ID,"login_btn").click()
        driver.find_element(By.XPATH, "//button[@id='login_btn']").click()

        time.sleep(3)

        # 获取实际结果
        result = driver.find_element(By.XPATH,"//div[@id='logo']/a").text  # text取出文本数据


        self.assertEqual(expect,result)

        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
#个人理财
        time.sleep(2)

        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
#基金理财
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
#广发投资
        time.sleep(2)

        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(pay)
#输密码
        time.sleep(2)

        driver.find_element(By.CLASS_NAME, "layui-layer-btn0").click()
#确定
        time.sleep(2)

        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
#确定
        time.sleep(2)

        driver.quit()






